#ifndef _KEY_H
#define _KEY_H

#include "stm32f4xx.h"
#include "stm32f4xx_hal.h"
#include "stm32f4xx_hal_gpio.h"
#include "stdint.h"
#include "main.h"
#include "cmsis_os.h"

#define key_release    0      //松开按键
#define key_press      1      //按下按键

typedef struct key
{
    uint8_t key_status;

    uint8_t (*get_key_status)(void);

    void (*key_init)(void);

} key_t;



extern uint8_t get_key_status(void);
extern void key_init(void);

#endif
